import java.time.LocalDateTime;
import java.util.concurrent.locks.LockSupport;

public class LockSupportDemo2 {
    public static void main(String[] args) {
        Thread t1=new Thread(()->{
            System.out.println("线程1：开始执行"+ LocalDateTime.now());
            LockSupport.parkUntil(System.currentTimeMillis()+1000);
            System.out.println("线程1：结束执行"+LocalDateTime.now());
        },"线程1");
        t1.start();
    }
}
